<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            margin: 100px auto;
            width: 200px;
            height: 200px;
            border: 1px solid pink;

            /* 隐藏跃出属性 */
            overflow: hidden;
        }

        div::before {
            content: '折腾';
            display: block;
            width: 100%;
            height: 100%;
            background-color: chartreuse;

            /* 一左下角为中心点旋转180度 */
            transform: rotate(180deg);
            transform-origin: left bottom;

            /* 过渡 */
            transition: all 2s;
        }

        div:hover::before {
            transform: rotate(0deg);
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>